package com.xcc.annotation.aop;

import com.xcc.annotation.aop.config.Demo01_Aspect;
import com.xcc.annotation.aop.log.MathCalculator;
import org.junit.jupiter.api.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class MainAopTest {

    @Test
    public void testAspect() {
        ApplicationContext applicationContext = new AnnotationConfigApplicationContext(Demo01_Aspect.class);
        MathCalculator bean = applicationContext.getBean(MathCalculator.class);
        bean.div(11, 1);
    }
}
